package cn.ibdsr.human.constant;

import lombok.Getter;
import lombok.Setter;

public enum GenderEnum {
    /**
     * 正常状态
     */
    NO_LIMIT(0,"不限"),
    /**
     * 已冻结状态
     */
    MAN(1,"男"),

    /**
     * 已冻结状态
     */
    WOMAN(2,"女"),

    ;

    /**
     * 状态值
     */
    @Setter
    @Getter
    private int type;
    /**
     * 状态描述
     */
    @Setter
    @Getter
    private String desc;


    GenderEnum(int type, String desc){
        this.type =type;
        this.desc= desc;
    }

    public static GenderEnum valueOf(int status) {
        for (GenderEnum s : GenderEnum.values()) {
            if (s.getType() == status) {
                return s;
            }
        }
        return null;
    }

}
